package main
import (
	"github.com/jsonmarshal"
	"fmt"
	"io"
)
var (
	data string
	r    io.Reader
	w    io.Writer
)
type Monster struct{

	Name string
	Age int
	Birthday string
	Skill string

}
type TestIntBoolUIntFloat struct {
	BOOLtest    bool
	FlOAT32test float32
	FlOAT64test float64
	INT16test   int16
	INT32test   int32
	INT64test   int64
	INT8test    int8
	INTtest     int
	UINT16test  uint16
	UINT32test  uint32
	UINT64test  uint64
	UINT8test   uint8
	UINTtest  uint

}
type TestSlice struct {
	Float32slice []float32
	Float64slice []float64
	Intslice     []int
	Stringslice  []string
}
type TestMap struct {
	Int2Int          map[int]int
	String2Int       map[string]int
	String2Interface map[string]interface{}
}
type TestTag struct {
	COLOR string         `jsonmarshal:"-,omitempty"`
	MEN   bool           `jsonmarshal:"Men,omitempty"`
	ID    int            `jsonmarshal:"id"`
	MYMAP map[string]int `jsonmarshal:",omitempty"`
	SID   int            `jsonmarshal:"-"`
	WOMEN bool           `jsonmarshal:"Women,omitempty"`
}
func main(){
	type Person struct {
        Name string `jsonmarshal:"name"`
        Age  int
        Addr string `jsonmarshal:"addr"`
    }
    p1 := Person{
        Name: "taoge",
        Age:  30,
        Addr: "China",  
    }


	qaq, err :=jsonmarshal.JsonMarshal(&p1)
	if err != nil{
		panic(err)
	}
	fmt.Println(string(qaq))
	// group := TestIntBoolUIntFloat{
	// 	BOOLtest:    true,
	// 	FlOAT32test: 32.666,
	// 	FlOAT64test: 64.888,
	// 	INT16test:   16,
	// 	INT32test:   32,
	// 	INT64test:   64,
	// 	INT8test:    8,
	// 	INTtest:     1,
	// 	UINT16test:  16,
	// 	UINT32test:  32,
	// 	UINT64test:  64,
	// 	UINT8test:   8,
	// 	UINTtest:    1,
	// }
	// js, err := jsonmarshal.JsonMarshal(&group)
	// jsl, errl := json.Marshal(&group)
	// if err != nil || errl != nil {
	// }
	// fmt.Println(string(js))
	// fmt.Println(string(jsl))

	// group1 := TestSlice{
	// 	Intslice:     []int{1, 2, 3, 4, 5},
	// 	Float32slice: []float32{10.0, 8.8, 9.9, 10.0, 44.0},
	// 	Float64slice: []float64{1000.0, 2.0, 3.4, 7.0, 50.0},
	// 	Stringslice:  []string{"hel", "isa", "oiqw", "saoi", "gfqw"},
	// }
	// js1, err := jsonmarshal.JsonMarshal(group1)
	// jsl1, errl := json.Marshal(group1)
	// fmt.Println(string(js1))
	// fmt.Println(string(jsl1))
	// if err != nil || errl != nil {
		
	// }
	// group := TestMap{
	// 	Int2Int:          map[int]int{1: 1, 2: 2, 3: 3},
	// 	String2Int:       map[string]int{"a": 1, "b": 2, "c": 3},
	// 	String2Interface: map[string]interface{}{"Address": "深圳", "Phone": "12345678911", "Salary": 10000},
	// }
	// js, err := jsonmarshal.JsonMarshal(group)
	// jsl, errl := json.Marshal(group)
	// if err != nil || errl != nil {
	// }
	// fmt.Println(string(js))
	// fmt.Println(string(jsl))
	// group := TestTag{
	// 	ID:    111,
	// 	SID:   222,
	// 	MEN:   true,
	// 	WOMEN: false,
	// 	COLOR: "Red",
	// 	MYMAP: map[string]int{},
	// }
	// js, err := jsonmarshal.JsonMarshal(group)
	// jsl, errl := json.Marshal(group)
	// if err != nil || errl != nil {
	// }
	// fmt.Println(string(js))
	// fmt.Println(string(jsl))
}